package com.xsmart.oa.api.wx;

import com.xsmart.common.entity.RequestBean;
import com.xsmart.oa.services.wx.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xuqinyuan
 * 会员信息类
 */
@RestController
@RequestMapping("/api")
public class UserInfoController {
    @Autowired
    UserInfoService userInfoService;

    /**
     * 查询会员的信息
     * @param requestBean
     * @param request
     * @return
     */
    @PostMapping(value = "/v1/UserService/queryUserInfo")
    public Object queryUserInfo(@ModelAttribute RequestBean requestBean, HttpServletRequest request) {
        return userInfoService.queryUserInfo(requestBean);
    }

    /**
     * 查询申请分销商状态
     * @param requestBean
     * @param request
     * @return
     */
    @PostMapping(value = "/v1/UserService/queryApplyStatus")
    public Object queryApplyStatus(@ModelAttribute RequestBean requestBean, HttpServletRequest request){
        return userInfoService.queryApplyStatus(requestBean);
    }
}
